//
//  LHNewDetailTableViewCell.m
//  Enjoy_Music
//
//  Created by Bruce_Lin on 15/6/9.
//  Copyright (c) 2015年 Bruce. All rights reserved.
//

#import "LHNewDetailTableViewCell.h"

@implementation LHNewDetailTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.heartImage = [[UIImageView alloc]init];
        [self.contentView addSubview:_heartImage];
        self.heartImage.backgroundColor = [UIColor redColor];
        
        self.titleNameLabel = [[UILabel alloc]init];
        _titleNameLabel.textAlignment = NSTextAlignmentLeft;
        _titleNameLabel.font = [UIFont systemFontOfSize:20];
        [self.contentView addSubview:_titleNameLabel];
        _titleNameLabel.textColor = [UIColor whiteColor];
        
        self.singerNameLabel = [[UILabel alloc]init];
        _singerNameLabel.textAlignment = NSTextAlignmentLeft;
        [self.contentView addSubview:_singerNameLabel];
        _singerNameLabel.textColor = [UIColor whiteColor];
        
        self.lineLabel = [[UILabel alloc]init];
        [self.contentView addSubview:_lineLabel];
        _lineLabel.backgroundColor = [UIColor colorWithWhite:0.796 alpha:1.000];
        
//        self.myImageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"555副本"]];
//        [self.contentView addSubview:_myImageView];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    [self.heartImage setFrame:CGRectMake(0, 0, self.contentView.frame.size.width / 6, self.contentView.frame.size.height)];
    [self.titleNameLabel setFrame:CGRectMake(_heartImage.frame.size.width, 0, self.contentView.frame.size.width - _heartImage.frame.size.width - 20, self.contentView.frame.size.height / 2 + 5)];
    [self.singerNameLabel setFrame:CGRectMake(_titleNameLabel.frame.origin.x, _titleNameLabel.frame.size.height, _titleNameLabel.frame.size.width, self.contentView.frame.size.height / 2 - 5)];
    [self.lineLabel setFrame:CGRectMake(_heartImage.frame.size.width, self.frame.size.height - 2, LHWidth - _heartImage.frame.size.width, 2)];
//    [self.myImageView setFrame:CGRectMake(_titleNameLabel.frame.size.width, 0, LHWidth - _titleNameLabel.frame.size.width, self.contentView.frame.size.height - 2)];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
